/**
* project3D Engine
* @author John Sword
* @version 2 - AS3
* 
* simple Line Primitive
*/

package engine.objects
{
	
	import engine.geom.Vector;
	import engine.geom.Vertex;
	import engine.materials.Material;

	public class Line extends Object3D
	{
		
		private var h:Number;
		private var w:Number;
		
		/**
		* Constructor
		* @param m Wireframe material
		* @param o Origin point
		* @param e End point
		*/
		public function Line ( m:Material, o:Vector, e:Vector )
		{
			this.position = new Vector();
			this.material = m;
			this.cull = false;
			
			var ov:Vertex = new Vertex(o.x,o.y,o.z);
			var ev:Vertex = new Vertex(e.x,e.y,e.z);
			
			// build vertexes
			createVertex(ov);
			createVertex(ev);
			
			build();
		}
		
		// initialization
		private function build () : void
		{	
			createFace ( 0, 1, 0, null, null, null, material );
		}
	}

	
}

